package com.woniu.command.proscheduingcommand;

import com.woniu.command.Command;
import com.woniu.command.handle.ProSchedulingCommandHandle;
import com.woniu.outlet.po.ProSchedulingPo;
import com.woniu.uitl.ApplicationContextHolder;

public class UpdateProScheduingCommand implements Command<ProSchedulingPo,String> {

    private ProSchedulingCommandHandle handle;

    public UpdateProScheduingCommand() {
        this.handle = ApplicationContextHolder.getApplicationContext().getBean(ProSchedulingCommandHandle.class);
    }


    public String excute(ProSchedulingPo po) {
        String msg = handle.update(po);
        return msg;
    }

    public String excute(Long proScheId,String status) {
        String msg = handle.updateStatus(proScheId, status);
        return msg;
    }
}
